home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Folder Watching / Folder Watcher FBA ƒ / Sources / FBALists.h < prev    next >
Encoding:
Text File  |  1996-02-16  |  1.4 KB  |  48 lines  |  [TEXT/CWIE]

  1. // FBALists.h
  2. //
  3. // Folder Watcher FBA by Greg Sutton
  4. // ©Apple Computer Inc 1996, all rights reserved.
  5.  
  6.  
  7. #pragma once
  8.  
  9. #include <Files.h>
  10.  
  11. typedef struct ItemRec                            // All linked lists have a pointer
  12. {                                                // to the next item first.
  13.     struct ItemRec*            next;                // This allows for general routines
  14. } ItemRec, *ItemPtr;                            // on linked lists.
  15.  
  16. typedef struct WatchFolderRec
  17. {
  18.     ItemPtr                    next;                // Keep a linked list
  19.  
  20.     FSSpec                    theSpec;            // FSSpec of folder
  21.     long                    theDirID;            // Actual directory ID of the folder
  22.     short                    theFileCount;        // The previous number of files
  23.  
  24. } WatchFolderRec, *WatchFolderPtr;
  25.  
  26. typedef struct WatchVolumeRec
  27. {
  28.     ItemPtr                    next;                // Keep a linked list
  29.  
  30.     short                    theVolRef;            // Volume with watch folders
  31.     unsigned long            theLastModCheck;    // Last time PBCatSearch() performed on volume
  32.  
  33. } WatchVolumeRec, *WatchVolumePtr;
  34.  
  35.  
  36. Boolean            InitWatchFolders( void );
  37. Boolean            AddFolder( FSSpec* theSpec );
  38. Boolean            AddVolume( short theVolRef );
  39. WatchFolderPtr    GetHeadFolderPtr( void );
  40. WatchVolumePtr    GetHeadVolumePtr( void );
  41. long            GetNumberOfFolders( void );
  42. long            GetNumberOfVolumes( void );
  43. WatchFolderPtr    FolderInList( FSSpec* theSpec );
  44. Boolean            VolumeAndDirIDInList( short theVolRef, long theDirID );
  45. void            FirstVolumeToLast( void );
  46. void            AddFolderPathResource( FSSpec* theSpec );
  47. OSErr            GetDirInfo( FSSpec* theSpec, CInfoPBRec* thePB);
  48.